# -*- coding:utf-8 -*-
# 迭代生成器

def fib(max):
    n, a, b = 0, 1, 1
    while n < max:
        yield a
        a, b = b, a + b
        n += 1
    return 'over'


f = fib(10)  # 此时没有进fib函数内断点
print(f)  # <generator object fib at 0x102168b48>

for num in f:
    print(num)
